//
//  HHNavigationController.m
//  oschina
//
//  Created by hjl on 16/3/30.
//  Copyright © 2016年 hjl. All rights reserved.
//

#import "HHNavigationController.h"
#import "HHNavigationBar.h"
@interface HHNavigationController ()

@end

@implementation HHNavigationController

+ (void)initialize
{
    UINavigationBar *bar = [UINavigationBar appearance];
    // 设置导航栏为绿色
    bar.barTintColor = HHBackgroundColor;
    
    // 设置导航栏文字的大小和颜色
    NSMutableDictionary *md = [NSMutableDictionary dictionary];
    md[NSFontAttributeName] = [UIFont systemFontOfSize:20];
    md[NSForegroundColorAttributeName] = [UIColor whiteColor];
    [bar setTitleTextAttributes:md];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 自定义NavigationBar
    [self setupNavigationBar];
}

- (void)setupNavigationBar{
    UINavigationBar *bar = [[HHNavigationBar alloc]init];
    [self setValue:bar forKey:@"NavigationBar"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
